$OpenBSD: patch-scripts_xdg-mime_in,v 1.2 2015/01/04 15:36:22 ajacoutot Exp $
--- scripts/xdg-mime.in.orig	Thu Oct  9 16:44:34 2014
+++ scripts/xdg-mime.in	Sun Jan  4 16:32:44 2015
@@ -384,6 +384,9 @@ defapp_generic()
        for prefix in "$XDG_MENU_PREFIX" ""; do
           DEBUG 2 "Checking $x/applications/${prefix}defaults.list and $x/applications/${prefix}mimeinfo.cache"
           trader_result=`grep "$MIME=" $x/applications/${prefix}defaults.list $x/applications/${prefix}mimeinfo.cache 2> /dev/null | cut -d '=' -f 2 | cut -d ';' -f 1`
+       if [ -z "$trader_result" ] ; then
+          trader_result=`grep "$MIME=" $x/applications/mimeinfo.cache  2> /dev/null | cut -d '=' -f 2 | cut -d ';' -f 1`
+       fi
           if [ -n "$trader_result" ] ; then
               echo $trader_result
               exit_success
